package com.juzipi.demo.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

//资源角色关系实体类（中间表）
@Data
@TableName(value = "role_resource")
public class RoleResource {

    @TableId(type = IdType.AUTO)
    private Long id;
    private Long resourceId;
    private Long roleId;


    //单例模式，静态内部类三步
    //私有化构造器
    private RoleResource(){

    }

    //静态代码块
    private static class RoleResourceInstance{
        private static final RoleResource INSTANCE = new RoleResource();
    }


    public static RoleResource getInstance(){
        return RoleResourceInstance.INSTANCE;
    }

}
